<template>
  <div class>
     <el-table :data="tableData" border style="width: 100%">
          <el-table-column  align="center" width="80">
            <template slot="header">
             <el-button class="el-icon-circle-plus" @click.prevent="addRow()"></el-button>
            </template>
            <template slot-scope="scope">
              <el-button size="mini" type="danger" class="el-icon-remove"
              @click="handleDelete(scope.$index, scope.row)"></el-button>
          </template>
          </el-table-column>
          <el-table-column
            type="index"
            width="50" label="NO.">
          </el-table-column>
          <el-table-column label="账户类型" align="center">
            <template slot-scope="scope">
              <el-select v-model="scope.row.accountType" >
                <el-option label="基本存款账户" value="1"></el-option>
                <el-option label="一般存款账户" value="2"></el-option>
                <el-option label="专用存款账户" value="3"></el-option>
                <el-option label="临时存款账户" value="4"></el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="开户银行名称" align="center">
            <template slot-scope="scope">
              <el-input v-model="scope.row.bankName"></el-input>
            </template>
          </el-table-column>
          <el-table-column label="账号" align="center">
            <template slot-scope="scope">
              <el-input v-model="scope.row.accountNumber"></el-input>
            </template>
          </el-table-column>
          
          <el-table-column label="开户行地址" align="center">
            <template slot-scope="scope">
              <el-input v-model="scope.row.bankAddress"></el-input>
            </template>
          </el-table-column>

          <el-table-column label="备注" align="center">
            <template slot-scope="scope">
              <el-input v-model="scope.row.remark"></el-input>
            </template>
          </el-table-column>
        </el-table>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
     tableData: []
    };
  },
  computed: {},
  mounted() {
 
  },
  methods: {
    getdata(){
      return this.tableData
    },
    // 增加行
    addRow() {
      var list = {
        bankName:'',
        bankNO:'',
        address:'',
        remark:''
      }
      this.tableData.unshift(list)
    },
    handleDelete(index, row) {
        this.tableData.splice(index, 1);
      }

  },
  created() {}
};
</script>
<style lang='scss' scoped>

</style>